The invention relates generally to data compression and in particular to processing a code stream for a digital image or the like.
Typically, during image compression a digital image and, in particular, image pixel data can be decomposed in a number of ways. Each decomposition introduces one or more divisions into the code stream representing the image. These divisions appear as distinct segments (or partitions) of the code stream produced by the compressions process. Different ordering of these segments into a code stream can provide different advantages and degrees of usefulness. For example, where image data is displayed as the data is read, some segment ordering may result in a display, which is progressive by quality. This is often used for images sourced over the Internet and displayed directly on a browser. Other segment orderings may provide a code stream, which is progressive by resolution, by spatial location, or by component (e.g. luminance then chrominance). Other orders may be chosen to match the order that minimizes buffering requirements of the encoder or decoder.
Maintaining a code stream as a set of segments allows to be readily parsed from one form to another. One problem or disadvantage with this approach however is that there quickly becomes a significant number of segments comprising the code stream. The decoder must be able to work out where each of these segments belongs in the decode process. Signalling this information explicitly for each segment leads to an unacceptable overhead. On the other hand, limiting the code stream to a few specific orderings is often too restrictive.
Thus, a need clearly exists for an improved method of processing a code stream that is able to substantially overcome, or at least ameliorate, one or more disadvantages of existing arrangements.
In accordance with a first aspect of the invention, a method of signalling a structure of a code stream comprising a plurality of code segments is disclosed. The method comprises the steps of:
determining a code segment indexing order based on a reference order for code segments and a set of permutation values for modifying ordering of indices of reference order; and
using code segment indexing order for signalling structure of code stream.
Preferably, the method further comprises the steps of:
providing reference order for code segments; and
providing set of permutation values. The reference order may be a predetermined order of divisions permitting incremental decoding. Further, the reference order may be dependent upon a predetermined coding process for producing code stream.
Preferably, structure of code stream is signalled to a decoder.
The code stream may relate to a decomposed, digital image. Alternatively, code stream may include at least one of audio and video data.
Preferably, each code segment in reference order is uniquely located using an N-dimensional vector, where N is an integer. Each index of vector is independent of a subsequent index in order. Still further, an index of each code segment may vary from an index of a previous code segment by one location in one dimension. N may be equal to six and indices of said vector may correspond to tile, component, resolution level, subband, block, and layer.
Preferably, set of permutation values is a permutation vector of reorganized indices of reference order.
Optionally, set of permutation values is a permutation vector of reorganized indices of resolution level, component, tile, subband, block, and layer.
In accordance with a second aspect of the invention, an apparatus of signalling a structure of a code stream comprises a plurality of code segments is disclosed. The apparatus comprises:
a device for determining a code segment indexing order based on a reference order for code segments and a set of permutation values for modifying ordering of indices of reference order; and
a device for using code segment indexing order for signalling structure of code stream.
In accordance with a third aspect of the invention, a computer program product having a computer readable medium having a computer program recorded therein for signalling a structure of a code stream comprising a plurality of code segments is disclosed. The computer program product comprises:
a computer readable program code module for determining a code segment indexing order based on a reference order for code segments and a set of permutation values for modifying ordering of indices of reference order; and
a computer readable program code module for using code segment indexing order for signalling structure of code stream.
In accordance with a fourth aspect of the invention, a method of indicating an ordering of code segments in a code stream is disclosed. The code stream is arranged in code stream in one of a plurality of ordered arrangements defined by indices. The method comprises the steps of:
associating a set of N-indices with each code segment, wherein each code segment is uniquely identified by N-indices;
providing a reference order for N-indices and a predetermined incrementing process for sequencing through N-indices;
providing a set of permutation values for modifying ordering of N-indices of reference order;
determining a code segment order from permutation values and reference order, and
using code segment order and predetermined incrementing process to indicate ordering of code segments in code stream.
Preferably, predetermined incrementing process is performed in a right to left fashion.
More preferably, predetermined incrementing process comprises the step of:
incrementing an index from least significant to most significant index within an allowed range of indices for a valid code segment.
Preferably, reference order is a predetermined order of divisions permitting incremental decoding.
Preferably, reference order is dependent upon a predetermined coding process for producing code stream.
Preferably, each index of set of N-indices is independent of a subsequent index in order and varies from an index of a previous code segment by one location in one dimension. Further, the set of permutation values is a permutation vector of reorganized indices of reference order.
In accordance with a fifth aspect of the invention, an apparatus for indicating an ordering of code segments in a code stream is disclosed. The code stream is arranged in code stream in one of a plurality of ordered arrangements defined by indices. The apparatus comprises:
a device for associating a set of N-indices with each code segment, wherein each code segment is uniquely identified by N-indices;
a device for providing a reference order for N-indices and a predetermined incrementing process for sequencing through N-indices;
a device for providing a set of permutation values for modifying ordering of N-indices of reference order;
a device for determining a code segment order from permutation values and reference order; and
a device for using code segment order and predetermined incrementing process to indicate ordering of code segments in code stream.
In accordance with a sixth aspect of the invention, a computer program product having a computer readable medium having a computer program recorded therein for indicating an ordering of code segments in a code stream is disclosed. The code stream is arranged in code stream in one of a plurality of ordered arrangements defined by indices. The computer program product comprises:
a computer readable program code module for associating a set of N-indices with each code segment, wherein each code segment is uniquely identified by N-indices;
a computer readable program code module for providing a reference order for N-indices and a predetermined incrementing process for sequencing through N-indices;
a computer readable program code module for providing a set of permutation values for modifying ordering of N-indices of reference order;
a computer readable program code module for determining a code segment order from permutation values and reference order; and
a computer readable program code module for using code segment order and predetermined incrementing process to indicate ordering of code segments in code stream.